package com.github.chirspan.xaas.core.config;

import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author ChenPan
 * @date 2018/6/26 17:07
 * description: 忽略权限的url配置
 */

@Data
@Configuration
@ConditionalOnExpression("!'${ignore}'.isEmpty()")
@ConfigurationProperties(prefix = "ignore")
public class IgnoreUrlsProperties {

    /**
     * 获取权限的url
     * key: url
     * value:请求类型 GET/POST/PUT/DELETE/*   多种类型时用逗号分隔
     */
    private Map<String, String> urls = new HashMap<>();

    private List<String> clients = new ArrayList<>();
}
